package com.hfi.visitor;

/**
 * @author ChangLiang
 * @date 2020/4/14
 */
public class PlainTextVisitor implements Visitor {

    private void printFormat() {
        System.out.println("plainText");
    }

    @Override
    public void visitStringInfo(ConstantInfo info) {
        printFormat();
        System.out.println(info.getOutputInfo());
    }

    @Override
    public void visitMethodInfo(ConstantInfo info) {
        printFormat();
        System.out.println(info.getOutputInfo());
    }

    @Override
    public void visitFieldInfo(ConstantInfo info) {
        printFormat();
        System.out.println(info.getOutputInfo());
    }

    @Override
    public void visitClassInfo(ConstantInfo info) {
        printFormat();
        System.out.println(info.getOutputInfo());
    }
}
